var cnavi='.comment_recent_navi';
var cnavi_a='.comment_recent_navi a';
var ccontent='.lastest_comments';

$(document).ready(function comment_recent_navi(){
	$(cnavi_a).click(function() {
		var z = $(this).attr("href");
		$.ajax({
			url: z,
			type:"POST",
			data:"action=comment_recent_navi",
			beforeSend:function()
			{
				document.body.style.cursor = 'wait';
				var C=0.7;
				//$(ccontent).css({opacity:C,MozOpacity:C,KhtmlOpacity:C,filter:'alpha(opacity=' + C * 100 + ')'});
				$(ccontent).fadeTo("slow",0.25);
				$(cnavi).html('<a class="left">载入中...</a>');
			},
			error:function (xhr, textStatus, thrownError){ 
				alert("readyState: " + xhr.readyState + " status:" + xhr.status + " statusText:" + xhr.statusText +" responseText:" +xhr.responseText + " responseXML:" + xhr.responseXML + " onreadystatechange" +xhr.onreadystatechange); 		
				alert(thrownError); 
			},	
			success: function (data)
			{
				//alert(data);
				$(ccontent).html(data);	
				$(ccontent).fadeTo("slow",1);
				//$(ccontent).show();					
				document.body.style.cursor = 'auto';
				var C=1; 
				//$(ccontent).css({opacity:C,MozOpacity:C,KhtmlOpacity:C,filter:'alpha(opacity=' + C * 100 + ')'});
				comment_recent_navi();//翻页后DOM变化了,需要重新绑定函数
			}
		});
		return false;
		});
})